API Documentation
Classes | Enumerations
nkImages Namespace Reference

Encompasses all API of component NilkinsImages. More...

Classes

struct  AlignmentDescriptor
 Holds information about alignment constraints. More...
 
class  AlignmentUtils
 Offers tools to realign an image's memory. More...
 
class  Bc1Compressor
 Responsible for BC1 compressed block reading. Used internally to decompress images. More...
 
class  Bc2Compressor
 Responsible for BC2 compressed block reading. Used internally to decompress images. More...
 
class  Bc3Compressor
 Responsible for BC3 compressed block reading. Used internally to decompress images. More...
 
class  BmpEncoder
 Offers capabilities to encode and decode BMP format. More...
 
class  DdsEncoder
 Offers capabilities to encode and decode DDS format. More...
 
class  HdrEncoder
 Offers capabilities to encode and decode HDR format. More...
 
class  Image
 Holds all information required for an image, with ownership over the data. More...
 
class  ImageBase
 Base for all image data classes. More...
 
struct  ImageDescriptor
 Describes an image within an array. Used internally. More...
 
class  ImageView
 Holds all information required for an image, with no ownership over the data. More...
 
class  LogManager
 Responsible for logging all messages from the component. By registering a nkLog::Logger inside, it is possible to listen to all messages logged. More...
 
struct  MipDescriptor
 Describes a mip within an image. Used internally. More...
 
class  PixelFormatUtils
 Utility class to translate enum values into linked useful data. More...
 

Enumerations

enum  PIXEL_FORMAT {
  PIXEL_FORMAT::UNKNOWN_FORMAT = 0, PIXEL_FORMAT::R8G8B8, PIXEL_FORMAT::R8G8B8A8, PIXEL_FORMAT::B8G8R8,
  PIXEL_FORMAT::B8G8R8A8, PIXEL_FORMAT::R32G32B32A32
}
 Lists formats for pixels. More...
 

Detailed Description

Encompasses all API of component NilkinsImages.

This component provides utility to load and save images, supporting some well-known formats.

nkImages is designed with graphics in mind, meaning that there are multiple options for specifying data alignment constraints. Decoded data will fit these alignment restrictions.

This can be useful for textures, which can require specific pixel / row alignments. Specifying these alignment constraints in advance means that no memory copy and realignment is necessary after decoding.

For more information on what formats are supported, see the *Encoder classes adapted to each format.

Enumeration Type Documentation

◆ PIXEL_FORMAT

Lists formats for pixels.

A pixel is often described by a set of 4 channels : Red, Green, Blue, and Alpha. Depending on the format, those channels can be exposed or not, with differing memory layouts. This enum hints what is available and how it is exposed.

Enumerator
UNKNOWN_FORMAT 

Format is unknown or not supported.

R8G8B8 

Format is 3 channels Red Green Blue, each occupying 8 bits (1 byte).

R8G8B8A8 

Format is 4 channels Red Green Blue Alpha, each occupying 8 bits (1 byte).

B8G8R8 

Format is 3 channels Blue Green Red, each occupying 8 bits (1 byte).

B8G8R8A8 

Format is 4 channels Blue Green Red Alpha, each occupying 8 bits (1 byte).

R32G32B32A32 

Format is 4 channels Red Green Blue Alpha, each occupying 32 bits (4 bytes), floats.